#ifndef ERRORLOG_H
#define ERRORLOG_H

#include <stdio.h>
#include <string.h>

#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define AT __FILE__":"TOSTRING(__LINE__)

class ErrorLog
{
public:
    ErrorLog();
    // 将错误信息写入到文件中
    void log_error(char *location, char *errMsg);
private:
    //存放编译错误的文件地址
    char *errorLog;
    int errorLength;
    FILE *errFp;
};

//const char *ErrorLog::errorLog;
//const int ErrorLog::errorLength;

#endif // ERRORLOG_H
